#include <stdio.h>

int main()
{
  int arr [10] = {0};
  int i = 0;
  for(i = 0;i < 9; i++)
  { 
    scanf("%d",&arr[i]);

  }
   int min = 0;
   int max = 0;
   
   int j = 0;
   for(j = 0;j < 10;j++)
   {
   	if(arr[j] > max)
   	  max =arr[j];
   	if(arr[j] < min)
   	  min = arr[j];
	 }  

	printf("%d\n",max-min);

	
	return 0;
 } 
